package com.cskaoyan.controller.backStage;

import com.cskaoyan.model.Log;
import com.cskaoyan.model.bo.BaseParamBO;
import com.cskaoyan.model.vo.BaseRespVO;
import com.cskaoyan.model.vo.DataVO;
import com.cskaoyan.service.LogService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: mall38
 * @description: 操作日志
 * @author: Lexis
 * @create: 2022-05-05 22:45
 **/
@RestController
@RequestMapping("admin/log")
public class LogController {
    @Autowired
    LogService logService;
    @RequiresPermissions("admin:log:list")
    @GetMapping("list")
    /**
     * @author: lixiaosheng
     * @description: 返回所有的操作日志
     * @date: 2022/5/5 22:55
     */
    public BaseRespVO<DataVO<Log>> logList(BaseParamBO param, String name){
        DataVO<Log> logDataVO = logService.query(param,name);
        return BaseRespVO.ok(logDataVO);
    }
}
